package com.hotel.controller;

import com.hotel.utils.WebUtils;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * Created by LinYaTing on 2018/11/28 0:24
 */
@WebServlet(name = "OrderServlet", urlPatterns = "/order")
public class OrderServlet extends BaseServlet {

    //跳转资源
    private Object uri;

    public Object listOrder(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
            //业务逻辑处理
            List<Map<String, Object>> orderList = orderService.findAll();
            //保存
            request.setAttribute("orderList", orderList);
            uri = request.getRequestDispatcher("/sys/order/order_list.jsp");
            return uri;
    }

}
